﻿using sixgod.Enum;
using SqlSugar;

namespace sixgod.Model.WorkFlowTemplate
{
    /// <summary>
    /// 节点连接
    /// </summary>
    [SugarTable("TemplateNodeLink")]
    public class TemplateNodeLink:ModelBase
    {
        public string TemplateId { get; set; }

        /// <summary>
        /// 上一个节点
        /// </summary>
        public string LastNode { get; set; }
        
        /// <summary>
        /// 操作
        /// </summary>
        public EnumNodeOperation Operation {get;set; }

        /// <summary>
        /// 下一个节点
        /// </summary>
        public string NextNode { get; set; }

        // todo 同意或拒绝后 执行其他内容 执行SQL、反射方法调用，以及相关内容、参数

        /// <summary>
        /// 回调外键
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string CallBackCode { get; set; }


        /// <summary>
        /// 模型数据验证
        /// </summary>
        /// <returns></returns>
        public override (bool, string) Verify()
        {
            return (false, null);
        }
    }
}
